var express = require('express');
var router = express.Router();
var kingLandHomeDao = require('../dao/king-land/index-dao');

/* GET home page. */
router.get('/', function(req, res, next) {
  kingLandHomeDao.getAllActiveBanners(function (banners) {
    res.render('king-land/index.ejs', { banners: banners });
  });
});

router.get('/about-us', function(req, res, next) {
    res.render('king-land/about-us.ejs', { title: '关于我们' });
});
router.get('/contact-us', function(req, res, next) {
    res.render('index', { title: '联系我们' });
});
router.get('/news', function(req, res, next) {
    res.render('king-land/news.ejs', { title: '新闻列表' });
});

module.exports = router;
